<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>银行卡</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no"/>
	    <meta http-equiv="Access-Control-Allow-Origin" content="*">
	    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
		<link rel="stylesheet" href="../css/base.css" />
		<link rel="stylesheet" href="../css/bankCard.css" />
		<script src="../js/jquery-2.2.3.min.js"></script>
		<script type="text/javascript" src="../js/rem.js"></script>
		<script src="../js/common.js"></script>
		<style>
			.back_li_kahao {
				display: block;
			}
		</style>
	</head>
	<body>
		<div class="header">
			<a href="javascript:history.back(-1)"><img class="left" src="../img/g_next.png" alt="" /></a>
			银行卡
			<!--<img onclick="location.href='add_bankCard.html'" class="TJ_card" src="../img/g_tjyhk.png" alt="" />-->
		</div>
		<div style="height: 0.44rem;"></div>
		<ul class="bankCard_main">

			<!-- <li class="back_two">
				<p class="back_li_kahao">****  **** **** 9633</p>
			</li> -->
		</ul>
	</body>
	<script>
		$.ajax({
			url:SURL+'/api/xlsusersbankcards/list',
			type:'post',
			data:{
				userId: localStorage.getItem('userId')
			},
			dataType:'json',
			success:res=>{
			    console.log(res)
				var list = res.data;
				list.forEach(element => {
					$('.bankCard_main').append(`
					<li class="back_one" style="background: url('ImageUrl + ${element.bankImge}') no-repeat; background-size: 100%;">
						<a class="back_li_kahao" data-number="${element.accNo}" data-name="${element.bankName}" data-id="${element.id}" href="jianglitixian.html?bankCardId=${element.id}">${element.accNo}</a>
					</li>
					`)
				});
				$('.back_li_kahao').click(function () {
				    localStorage.setItem('yh1',$(this).data('id'));
				    localStorage.setItem('yh2',$(this).data('number'));
				    localStorage.setItem('yh3',$(this).data('bankName'));
				    window.history.go(-1);
                })

			}
		})

	</script>
</html>
